package com.ncst.backend.mapper;

import com.ncst.backend.domain.Prescription;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 处方Mapper接口
 */
@Mapper
public interface PrescriptionMapper {

    Prescription selectById(@Param("id") Integer id);
    List<Prescription> selectAll();
    List<Prescription> selectByCondition(Prescription prescription);
    List<Prescription> selectByPage(@Param("offset") Integer offset, @Param("limit") Integer limit);
    Long countAll();
    Long countByCondition(Prescription prescription);
    int insert(Prescription prescription);
    int insertBatch(@Param("list") List<Prescription> list);
    int updateById(Prescription prescription);
    int deleteById(@Param("id") Integer id);
    int deleteByIds(@Param("ids") List<Integer> ids);

    List<Prescription> getByRegisterId(Integer registerId);
}
